package com.zdd.ehe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author ZhuiZhu
 * @since 2023-03-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("p_user_role")
@ApiModel(value = "UserRole对象", description = "")
public class UserRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户编号")
    private Integer userId;

    @ApiModelProperty("角色编号")
    private Integer roleId;

    @TableField(exist = false)
    @ApiModelProperty("用户账号")
    private String account;

    @TableField(exist = false)
    @ApiModelProperty("用户名称")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty("用户状态")
    private String del;

    @TableField(exist = false)
    @ApiModelProperty("角色标识")
    private String role;

    @TableField(exist = false)
    @ApiModelProperty("角色名称")
    private String roleName;

    @TableField(exist = false)
    @ApiModelProperty("角色描述")
    private String roleIntro;

    @TableField(exist = false)
    @ApiModelProperty("角色状态")
    private String roleStatus;

    @TableField(value = "authorize_time")
    @ApiModelProperty("授权时间")
    private LocalDateTime authorizeTime;

    @TableField(value = "status")
    @ApiModelProperty("授权状态")
    private String authorizeStatus;

    public UserRole(Integer userId, Integer roleId, LocalDateTime authorizeTime, String authorizeStatus) {
        this.userId = userId;
        this.roleId = roleId;
        this.authorizeTime = authorizeTime;
        this.authorizeStatus = authorizeStatus;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }


}
